<template>
    <div class="experienceTable">
        <div class="experience_inputs">
            <div class="operate_inputs">
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
                    <el-select class='newWidth' v-if='xxSelect' v-model="formInline.agentid" filterable placeholder="学校">
                        <el-option
                             v-for="(school,b) in schoolList"
                            :key="b"
                            :label="school.company +'('+ school.nickname + ')'"
                            :value="school.userid">
                        </el-option>
                    </el-select>
                    <el-select class='newWidth' v-model="formInline.classid" filterable placeholder="班级">
                        <el-option
                            v-for="(item,a) in classList"  
                            :key="a"
                            :label='item.name'
                            :value="item.id">
                        </el-option>
                    </el-select>
                    <el-select class='newWidth' v-model="formInline.teacherid" filterable placeholder="外教">
                        <el-option
                            v-for="(teacher,i) in teacherList"
                            :key="i"
                            :label="teacher.teachername"
                            :value="teacher.id">
                        </el-option>
                    </el-select>
                    <el-form-item label="上课时间:">
                        <el-date-picker
                            v-model="formInline.start_time"
                            type="date"
                            :clearable=false
                            value-format="yyyy-MM-dd"
                            placeholder="选择开始日期" style="width:160px;">
                        </el-date-picker>
                        <el-date-picker
                            v-model="formInline.end_time"
                            type="date"
                            :clearable=false
                            value-format="yyyy-MM-dd"
                            placeholder="选择结束日期" style="width:160px;">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item>
                        <el-button class="search_btn" type="primary" @click="getTableList"><i class="el-icon-search"></i>查询</el-button>
                        <el-button class="reset_btn" type="primary" @click="clearSearch"><i class="el-icon-refresh"></i>清空查询</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </div>
        <el-table
            v-loading="loading2"
            element-loading-text="加载中..."
            :data="experienceData"
            stripe 
            size="mini"
            border resizable
            style="width: 100%"
            :height="tableHeight">
            <el-table-column label="课程ID" :align="align">
                <template slot-scope="scope">{{scope.row.courseid}} </template>
            </el-table-column>
            <el-table-column label="学校" :align="align">
                <template slot-scope="scope">{{scope.row._school_name}} </template>
            </el-table-column>
            <el-table-column label="班级" :align="align">
                <template slot-scope="scope">{{scope.row.class.name}} </template>
            </el-table-column>
            <el-table-column label="助教" :align="align">
                <template slot-scope="scope">{{scope.row._assistant_name}} </template>
            </el-table-column>
            <el-table-column label="上课时间" :align="align">
                <template slot-scope="scope">{{scope.row.classSchedule.starttime | transData}} </template>
            </el-table-column>
            <el-table-column label="外教" :align="align">
                <template slot-scope="scope">{{scope.row.snap.teachernick}} </template>
            </el-table-column> 
             <el-table-column label="教材" :align="align">
                <template slot-scope="scope">{{scope.row.snap.coursewarename}} </template>
            </el-table-column>
            <el-table-column label="课程性质" :align="align">
                <template slot-scope="scope">{{scope.row.class.classtype==1?'体验班':'正式班'}} </template>
            </el-table-column>                  
            <el-table-column 
                align="center"
                min-width="390"
                label="操作">
                <template slot-scope="scope">
                    <el-button
                        size="mini"
                        @click='getCourseInfo(scope.row.grouporderid)'>课程详情</el-button>
                    <el-button
                        size="mini"
                        v-if="scope.row.cancelCourse==1?true:false"
                        @click='cancelCourse(scope.row.grouporderid)'>取消课程</el-button>
                    <el-button
                        size="mini"
                        v-if="scope.row.changeCourse==1?true:false"
                        @click='changeCourse(scope.row.grouporderid,scope.row.class.id)'>改签课程</el-button>
                    <el-button
                        size="mini"
                        v-if="scope.row.changeCourseware==1?true:false"
                        @click='changeCourseWare(scope.row.grouporderid)'>改签教材</el-button>
                </template>
            </el-table-column>
        </el-table>
        

         <!-- 取消课程 -->
        <el-dialog title="取消课程" 
            width='40%'
            :modal=false
            :close-on-click-modal=false
            :visible.sync="dialogFormVisible1">
            <div>
                此时距开课{{cancleInfo.diffhour}}小时，继续操作将扣取{{cancleInfo.chargepercent}}课时费，共计{{cancleInfo.chargemoney}}元，确认操作？
            </div>
            <div slot="footer" class="dialog-footer">
                <el-button class="dialog_close" @click="dialogFormVisible1=false">取 消</el-button>
                <el-button class="dialog_confirm" type="primary" @click="confirmCancel">确 定</el-button>
            </div>
        </el-dialog>

        <!-- 改签课程(连约) -->
        <!-- <el-dialog title="改签课程" 
            width='30%'
            :close-on-click-modal=false
            :modal=false
            :visible.sync="dialogFormVisible2">
            <el-form :model="form">
                <el-form-item label="课程类别:" :label-width="formLabelWidth">
                    <el-radio-group>
                         <el-radio :label='orderInfo?orderInfo.coursetype.itemid:""'>{{orderInfo?orderInfo.coursetype.name:''}}</el-radio> 
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="学期长度：" :label-width="formLabelWidth">
                    <el-input v-model="form.termlen" class='divided_3'></el-input>周
                    <span class="eg_tip">(例：每周4节课，约16周，总节数为64节)</span>
                </el-form-item>
                <el-form-item label="开始日期：" :label-width="formLabelWidth">
                    <el-date-picker 
                    type="date" placeholder="选择日期" 
                    v-model="form.startdate" 
                    value-format="yyyy-MM-dd"
                    style="width:200px;"></el-date-picker>
                </el-form-item>
                <el-form-item label="每周上课时间：" :label-width="formLabelWidth">
                   <el-button type="info" @click='addTime' plain>增加</el-button>
                </el-form-item>
                <el-form-item :label-width="formLabelWidth" v-for='(item,index) in form.timeArr' :key="index">
                    <el-select class="divided_3" v-model="item.timeperweek1" placeholder="星期几">
                        <el-option 
                            v-for="(wk,z) in weekarr"
                            :key="z" :label="wk.title" :value="wk.id"></el-option>
                    </el-select>
                    <el-select class="divided_3" v-model="item.timeperweek2" placeholder="课程时间">
                        <el-option 
                            v-for="(hr,y) in hourarr"
                            :key="y" :label="hr" :value="y"></el-option>
                    </el-select>
                    <el-button type="danger" @click='delRow(index)' plain>删除</el-button>
                </el-form-item>
                <el-form-item label="外教地区：" :label-width="formLabelWidth">
                    <el-radio-group v-model="form.areaid">
                        <el-radio :label='orderInfo?orderInfo.areainfo.itemid:""'>{{orderInfo?orderInfo.areainfo.name:''}}</el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="学习计划：" :label-width="formLabelWidth">
                    <el-select class="divided_3" v-model="course1id" @change="course1Change" placeholder="第一级">
                        <el-option 
                            v-for="(c1,f) in course1"
                            :key="f" :label="c1.title" :value="c1.id"></el-option>
                    </el-select>
                    <el-select class="divided_3" v-if='c2show' v-model="course2id" @change="course2Change" placeholder="第二级">
                        <el-option 
                            v-for="(c2,s) in course2"
                            :key="s" :label="c2.title" :value="c2.id"></el-option>
                    </el-select>
                    <el-select class="divided_3" v-if='c3show' v-model="course3id" @change="course3Change" placeholder="第三极">
                         <el-option 
                            v-for="(c3,t) in course3"
                            :key="t" :label="c3.title" :value="c3.id"></el-option>
                    </el-select>
                    <el-select class="divided_3" v-if='c4show' v-model="course4id" @change="course4Change" placeholder="第四极">
                         <el-option 
                            v-for="(c4,fo) in course4"
                            :key="fo" :label="c4.title" :value="c4.id"></el-option>
                    </el-select>
                    <el-select class="divided_3" v-if='c5show' v-model="course5id" @change="course5Change" placeholder="第五极">
                         <el-option 
                            v-for="(c5,fi) in course5"
                            :key="fi" :label="c5.title" :value="c5.id"></el-option>
                    </el-select>
                    <el-select class="divided_3" v-if='c6show' v-model="course6id" placeholder="第六极">
                         <el-option 
                            v-for="(c6,si) in course6"
                            :key="si" :label="c6.title" :value="c6.id"></el-option>
                    </el-select>
                </el-form-item>
                穿梭框
                <el-form-item :label-width="formLabelWidth">
                    <el-transfer v-model="form.studyplan" 
                    :data='transferdata'
                    :titles="['教材列表', '学习计划']"></el-transfer>
                </el-form-item>
                <el-form-item label-width="80px">
                    <el-tag type="info">附加选项</el-tag>
                </el-form-item>
                <el-form-item label="上课工具：" :label-width="formLabelWidth">
                    <el-select v-model="form.classtool">
                        <el-option v-for="(tool,gj) in form.classTool" :key='gj' 
                        :label="tool.attriname" :value="tool.attriid"></el-option>
                    </el-select>
                </el-form-item>
                 <el-form-item label="外教性别：" :label-width="formLabelWidth">
                   <el-radio-group v-model="form.gender">
                        <el-radio label='0'>无需求</el-radio>
                        <el-radio label='1'>男</el-radio>
                        <el-radio label='2'>女</el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="中文要求：" :label-width="formLabelWidth">
                    <el-select v-model="form.chineselevel">
                        <el-option v-for="(clevel,zw) in chineselevel" :key='zw' 
                        :label="clevel.attriname" :value="clevel.attriid"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="专业背景：" :label-width="formLabelWidth">
                    <el-select v-model="form.professional" placeholder="外教工作背景">
                        <el-option v-for="(pro,zy) in professional" :key='zy' 
                        :label="pro.attriname" :value="pro.attriid"></el-option>
                    </el-select>
                </el-form-item> 
                <el-form-item class='searchTeacher'>
                    <el-button type="danger" @click="searchTeacher" plain><i class="el-icon-search"></i>搜索外教</el-button>
                </el-form-item> 
            </el-form>

             添加成功后展示老师信息
            <teacherCardSy :avaTeacher2='avaTeacher2' :form='form'></teacherCardSy>


            <div slot="footer" class="dialog-footer">
                <el-button class="dialog_close" @click="dialogFormVisible2=false">取 消</el-button>
                <el-button class="dialog_confirm" type="primary" @click="dialogFormVisible2=false">确 定</el-button>
            </div>
        </el-dialog> -->

        <!-- 改签课程(散约) -->
        <el-dialog title="改签课程" 
            width='30%'
            :close-on-click-modal=false
            :modal=false
            :visible.sync="dialogFormVisible2">
            <el-form :model="form">
                <el-form-item label="课程类别:" :label-width="formLabelWidth">
                    <el-radio-group>
                         <el-radio :label='orderInfo?orderInfo.coursetype.itemid:""'>{{orderInfo?orderInfo.coursetype.name:''}}</el-radio> 
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="筛选时间：" :label-width="formLabelWidth">
                    <el-date-picker 
                        type="datetime" placeholder="开始日期" 
                        v-model="form.startdate" 
                        value-format="yyyy-MM-dd HH:mm:ss"
                        style="width:200px;"></el-date-picker>
                    <el-date-picker 
                        type="datetime" placeholder="结束日期" 
                        v-model="form.enddate" 
                        value-format="yyyy-MM-dd HH:mm:ss"
                        style="width:200px;"></el-date-picker>
                </el-form-item>
                 <el-form-item label="外教地区：" :label-width="formLabelWidth">
                    <el-radio-group v-model="form.areaid">
                        <el-radio v-for="(aitem,qy) in area" :key='qy' 
                        :label="aitem.attriid">{{aitem.attriname}}</el-radio>
                        <!-- <el-radio :label="0">不限</el-radio> -->
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="上课教材：" :label-width="formLabelWidth">
                    <el-select class="divided_3 bottom_4" v-model="course1id" @change="course1Change" placeholder="第一级">
                        <el-option 
                            v-for="(c1,f) in course1"
                            :key="f" :label="c1.title" :value="c1.id"></el-option>
                    </el-select>
                    <el-select class="divided_3 bottom_4" v-if='c2show' v-model="course2id" @change="course2Change" placeholder="第二级">
                        <el-option 
                            v-for="(c2,s) in course2"
                            :key="s" :label="c2.title" :value="c2.id"></el-option>
                    </el-select>
                    <el-select class="divided_3 bottom_4" v-if='c3show' v-model="course3id" @change="course3Change" placeholder="第三极">
                         <el-option 
                            v-for="(c3,t) in course3"
                            :key="t" :label="c3.title" :value="c3.id"></el-option>
                    </el-select>
                    <el-select class="divided_3 bottom_4" v-if='c4show' v-model="course4id" @change="course4Change" placeholder="第四极">
                         <el-option 
                            v-for="(c4,fo) in course4"
                            :key="fo" :label="c4.title" :value="c4.id"></el-option>
                    </el-select>
                    <el-select class="divided_3 bottom_4" v-if='c5show' v-model="course5id" @change="course5Change" placeholder="第五极">
                         <el-option 
                            v-for="(c5,fi) in course5"
                            :key="fi" :label="c5.title" :value="c5.id"></el-option>
                    </el-select>
                    <el-select class="divided_3 bottom_4" v-if='c6show' v-model="course6id"  @change="course6Change" placeholder="第六极">
                         <el-option 
                            v-for="(c6,si) in course6"
                            :key="si" :label="c6.title" :value="c6.id"></el-option>
                    </el-select>
                </el-form-item>
                
                <el-form-item label-width="80px">
                    <el-tag type="info">附加选项</el-tag>
                </el-form-item>
                <el-form-item label="上课工具：" :label-width="formLabelWidth">
                    <el-select v-model="form.classtool" placeholder='请选择上课工具'>
                        <el-option v-for="(tool,gj) in form.classTool" :key='gj' 
                        :label="tool.attriname" :value="tool.attriid"></el-option>
                    </el-select>
                </el-form-item>
                
                <!-- <el-form-item label="外教性别：" :label-width="formLabelWidth">
                   <el-radio-group v-model="form.gender">
                        <el-radio label='1'>男</el-radio>
                        <el-radio label='2'>女</el-radio>
                        <el-radio label='0'>无需求</el-radio>
                    </el-radio-group>
                </el-form-item> -->
                <!-- <el-form-item label="中文要求：" :label-width="formLabelWidth">
                    <el-select v-model="form.chineselevel" placeholder='外教中文水平'>
                        <el-option v-for="(clevel,zw) in chineselevel" :key='zw' 
                        :label="clevel.attriname" :value="clevel.attriid"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="专业背景：" :label-width="formLabelWidth">
                    <el-select v-model="form.professional" placeholder="外教工作背景">
                        <el-option v-for="(pro,zy) in professional" :key='zy' 
                        :label="pro.attriname" :value="pro.attriid"></el-option>
                    </el-select>
                </el-form-item>  -->
                <el-form-item class='searchTeacher'>
                    <el-button type="danger" @click="searchTeacher" plain><i class="el-icon-search"></i>查询</el-button>
                </el-form-item> 
            </el-form>

             <!-- 添加成功后展示老师信息 -->
            <teacherCardSy @changeDia='dialogChange' :avaTeacher2='avaTeacher2' :form='form'></teacherCardSy>


            <div slot="footer" class="dialog-footer">
                <el-button class="dialog_close" @click="dialogFormVisible2=false">取 消</el-button>
                <el-button class="dialog_confirm" type="primary" @click="dialogFormVisible2=false">确 定</el-button>
            </div>
        </el-dialog>

        
        <!-- 改签教材 -->
        <el-dialog title="改签教材" 
            width='40%'
            :modal=false
            :close-on-click-modal=false
            :visible.sync="dialogFormVisible3">
            <el-form>
                <el-form-item label="学习计划：" :label-width="formLabelWidth">
                    <!-- <el-cascader
                        :options="options"
                        v-model="selectedOptions"
                        @change="cascaderChange"
                        size='Maximum'>
                    </el-cascader> -->
                     <el-select class="divided_3 bottom_4" v-model="course1id" @change="course1Change" placeholder="第一级">
                        <el-option 
                            v-for="(c1,f) in course1"
                            :key="f" :label="c1.title" :value="c1.id"></el-option>
                        </el-select>
                        <el-select class="divided_3 bottom_4" v-if='c2show' v-model="course2id" @change="course2Change" placeholder="第二级">
                            <el-option 
                                v-for="(c2,s) in course2"
                                :key="s" :label="c2.title" :value="c2.id"></el-option>
                        </el-select>
                        <el-select class="divided_3 bottom_4" v-if='c3show' v-model="course3id" @change="course3Change" placeholder="第三极">
                            <el-option 
                                v-for="(c3,t) in course3"
                                :key="t" :label="c3.title" :value="c3.id"></el-option>
                        </el-select>
                        <el-select class="divided_3 bottom_4" v-if='c4show' v-model="course4id" @change="course4Change" placeholder="第四极">
                            <el-option 
                                v-for="(c4,fo) in course4"
                                :key="fo" :label="c4.title" :value="c4.id"></el-option>
                        </el-select>
                        <el-select class="divided_3 bottom_4" v-if='c5show' v-model="course5id" @change="course5Change" placeholder="第五极">
                            <el-option 
                                v-for="(c5,fi) in course5"
                                :key="fi" :label="c5.title" :value="c5.id"></el-option>
                        </el-select>
                        <el-select class="divided_3 bottom_4" v-if='c6show' v-model="course6id" @change="course6Change" placeholder="第六极">
                            <el-option 
                                v-for="(c6,si) in course6"
                                :key="si" :label="c6.title" :value="c6.id"></el-option>
                        </el-select>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button class="dialog_confirm" type="primary" @click="setCourseware">确定修改</el-button>
                <el-button class="dialog_close" @click="dialogFormVisible3=false">取 消</el-button>
            </div>
        </el-dialog>

        <!-- 课程详情 -->
        <el-dialog title="课程详情" 
            width='40%'
            :modal=false
            :close-on-click-modal=false
            v-if='ifcourseInfo'
            :visible.sync="dialogFormVisible4">
            <el-form>
                <el-form-item label="课程编号:" :label-width="formLabelWidth4">
                    <div>{{courseInfo.classSchedule.classid}}</div>
                </el-form-item>
                <el-form-item label="课程类项:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.class'>{{courseInfo.class.classtype==1?'First Class':'Regular Class'}}</div>
                </el-form-item>
                <el-form-item label="课程规模:" :label-width="formLabelWidth4">
                    <div>班课</div>
                </el-form-item>
                <el-form-item label="上课班级:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.class'>{{courseInfo.class.name}}</div>
                </el-form-item>
                <el-form-item label="所属合作校:" :label-width="formLabelWidth4">
                    <div>{{courseInfo._school_name}}</div>
                </el-form-item>
                <el-form-item label="合作校联系方式:" :label-width="formLabelWidth4">
                    <div>{{courseInfo.school.mobile}}</div>
                </el-form-item>
                <el-form-item label="云海螺负责人:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.school.admin'>{{courseInfo.school.admin.realname}}</div>
                </el-form-item>
                 <el-form-item label="负责人联系方式:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.school.admin'>{{courseInfo.school.admin.mobile}}</div> 
                </el-form-item>
                <el-form-item label="上课时间:" :label-width="formLabelWidth4">
                    <el-input disabled v-model="starttime" class='divided_150'></el-input> -
                    <el-input disabled v-model="endtime" class='divided_150'></el-input>
                </el-form-item>
                <el-form-item label="老师姓名:" :label-width="formLabelWidth4">
                    <el-input disabled v-model="courseInfo.teacher.teachername"></el-input>
                </el-form-item>
                 <el-form-item label="学生上课工具:" :label-width="formLabelWidth4">
                    <div>{{courseInfo._classtoolName}} ：{{courseInfo.classtoolaccount}}</div>
                </el-form-item>
                <el-form-item label="老师上课工具:" :label-width="formLabelWidth4">
                    <!-- <el-input disabled v-model="courseInfo. _teacherToolAccount"></el-input> -->
                    <div style="float:left;">{{courseInfo._classtoolName}} ：{{courseInfo._teacherToolAccount}}</div>
                    <el-button type="danger" v-if='courseInfo.changeTool==1?true:false'  @click="changeClassTool" plain style="float:right;">改签上课工具</el-button>
                </el-form-item>
                <el-form-item label="课件名称:" :label-width="formLabelWidth4">
                    <div>{{courseNameTree}}</div>
                </el-form-item>
                
                <el-form-item label="学员课件下载:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.bookData' class="kejianStyle"
                        v-for="(book,index) in courseInfo.bookData.stu_book_b" :key="index">
                        <el-button icon='el-icon-document' plain size='mini'                      
                        @click="dodown(book)"></el-button>
                    </div>
                </el-form-item>
                <el-form-item label="老师课件下载:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.bookData' 
                        class="kejianStyle"
                        v-for="(tbookb,index2) in courseInfo.bookData.teacher_book_b" :key='index2'>
                        <el-button icon='el-icon-document' plain size='mini'                        
                        @click="dodown(tbookb)"></el-button>
                    </div>
                </el-form-item>
                <el-form-item label="双师中教教案:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.bookData' 
                        class="kejianStyle"
                        v-for="(ctbook,index3) in courseInfo.bookData.coteacher_book" :key='index3'>
                        <el-button icon='el-icon-document' plain size='mini'                        
                        @click="dodown(ctbook)"></el-button>
                    </div>
                </el-form-item>
                <el-form-item label="音频课件下载:" :label-width="formLabelWidth4">
                    <div v-if='courseInfo.bookData' 
                        class="kejianStyle"
                        v-for="(sbooka,index4) in courseInfo.bookData.stu_book_audio" :key='index4'>
                        <el-button icon='el-icon-document' plain size='mini'                        
                        @click="dodown(sbooka)"></el-button>
                    </div>
                </el-form-item>
                <el-form-item label="老师对这节课的评价:" :label-width="formLabelWidth4">
                    <el-input
                        type="textarea"
                        :rows="5" disabled
                        placeholder="请输入内容"
                        v-if='courseInfo.teacherCourseEvel'
                        v-model="courseInfo.teacherCourseEvel.content">
                    </el-input>
                </el-form-item>
                <el-form-item label="老师对这节课学员的评价" :label-width="formLabelWidth4">
                </el-form-item>
                <div v-for='(item2,index2) in courseInfo.agentCourserEvel' :key='index2'>
                    <el-form-item :label="item2.nickname+':'" :label-width="formLabelWidth4">
                        <el-input
                            type="textarea"
                            :rows="5" disabled
                            placeholder="请输入内容"
                            v-model="item2.teachereval">
                        </el-input>
                    </el-form-item>
                </div>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button class="dialog_close" @click="dialogFormVisible4=false">关闭</el-button>
            </div>
        </el-dialog>

        <!-- 改签上课工具 -->
        <el-dialog title="改签上课工具" 
            width='54%'
            :modal=false
            :close-on-click-modal=false
            :visible.sync="dialogFormVisible5">
            <el-form>
                <el-form-item label="上课工具：" :label-width="formLabelWidth">
                    <el-select v-model="changedTool">
                        <el-option 
                            v-for="(ctitem,ct) in form.classTool"
                            :key="ct" :label="ctitem.attriname" :value="ctitem.attriid"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="填写号码：" :label-width="formLabelWidth">
                    <el-input v-model="classtoolAccount" class='divided_2'></el-input>
                </el-form-item>
            </el-form>
        <div slot="footer" class="dialog-footer">
                <el-button class="dialog_confirm" type="primary" @click="confirmChangeTool">确定修改</el-button>
                <el-button class="dialog_close" @click="dialogFormVisible5=false">取 消</el-button>
            </div>
        </el-dialog>

         <div class="page_block">
            <el-pagination
                background
                @current-change="handleCurrentChange"
                :current-page.sync="currentPage"
                :page-size="page_size"
                small
                layout="prev, pager, next, jumper"
                :total="totalCount">
            </el-pagination>
        </div>
    </div>
</template>

<script>    
    import base from '../api/base.js'
    import {formatDate} from '../../static/js/date.js'
    import teacherCardSy from '../components/teacherCardSy.vue'
    export default {
        components:{
            teacherCardSy
        },
        data(){
            return{
                changedTool:'',//改签的工具id
                classtoolAccount:'',//用户输入
                tableHeight:window.innerHeight-300,
                loading2:true,
                courseNameTree:[],
                prevurl:'http://file.ehailuo.com',
                courseInfo:{},
                starttime:'',
                endtime:'',
                ifcourseInfo:false,
                grouporderid:'',
                xxSelect:false,
                options:[],
                selectedOptions: [],
                dataArr:[],
                //教师卡片
                avaTeacher2:[],//可用老师列表
                totalCount:0,
                // 分页数据
                currentPage: 1,
                cur_page:1,
                page_size:16,
                formInline: {
                    teacherid:'',
                    agentid:'',
                    classid:'',
                    start_time:'',
                    end_time:'',
                },
                align:'center',
                columWidth:148,
                formLabelWidth:'160px',
                formLabelWidth4:'200px',
                courseid:0,//课程id
                course1:'',
                course1id:'',
                course2:'',
                course2id:'',
                course3:'',
                course3id:'',
                course4:'',
                course4id:'',
                course5:'',
                course5id:'',
                course6:'',
                course6id:'',
                c2show:false,
                c3show:false,
                c4show:false,
                c5show:false,
                c6show:false,
                course6id:'',
                weekarr:[
                    {
                        title:'星期一',
                        id:'1'
                    },
                    {
                        title:'星期二',
                        id:'2'
                    },
                    {
                        title:'星期三',
                        id:'3'
                    },
                     {
                        title:'星期四',
                        id:'4'
                    },
                    {
                        title:'星期五',
                        id:'5'
                    },
                    {
                        title:'星期六',
                        id:'6'
                    },
                    {
                        title:'星期日',
                        id:'7'
                    }
                ],
                hourarr:['0点','1点','2点','3点','4点','5点','6点','7点','8点','9点','10点','11点','12点','13点','14点',
                '15点','16点','17点','18点','19点','20点','21点','22点','23点','24点'],
                area:[],
                chineselevel:[],
                professional:[],
                //穿梭框数据
                transferdata:[],
                transferData:[],
                // 课表
                experienceData: [],
                teacherList:'',//老师列表
                schoolList:'',
                classList:'',
                dialogFormVisible1:false,
                dialogFormVisible2:false,
                dialogFormVisible3:false,
                dialogFormVisible4:false,
                dialogFormVisible5:false,
                cancleInfo:'',
                form: {
                    classTool:[],
                     // 搜索老师表单
                    classid:'',
                    areaid:'',
                    gender:'',
                    classtool:'',
                    chineselevel:'',
                    professional:'',
                    startdate:'',
                    enddate:'',
                    coursewareid:'',
                    termlen:'',
                    studyplan:[],
                    passholiday:'',
                    changeid:'',
                    timeArr:[{
                        timeperweek1:'',
                        timeperweek2:'',
                        timeperweek:''
                    }],
                    // tpArr:[],
                    // tpArr2:[],
                    // tpArr3:[],
                    // tpArr:['2-3','1-1','3-12']
                    changeid:'',
                    ischangeid:true
                },
                orderInfo:'',
                newcoursewareid:'',//改签教材id
            }
        },
        methods: {
            //改签上课工具
            changeClassTool(){
                this.getTeacherOpt()
                this.dialogFormVisible5=true
            },
            //确认改签工具
            confirmChangeTool(){
                this.$axios({
                    url: base.baseUrl+"/school/course/set-course-detail",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        changeid:this.grouporderid,
                        newclasstool:this.changedTool,
                        classtoolaccount:this.classtoolAccount 
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.alertTip('改签成功')
                        this.dialogFormVisible5=false
                    }else if(res.data.code==-2){
                        this.$router.push('/login');
                    }
                });
                
            },
            getChangeCourserware(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        changeid:this.changeid,
                        onlycoursewar:1
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.options=this.dataForm(res.data.data);
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                })
            },
            // 课程联动
            getCourseList(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        changeid:this.changeid,
                        onlycoursewar:1
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        this.course1=res.data.data;
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            course1Change(e){
                this.transferdata=[]
                this.course2id=this.course3id=this.course4id=this.course5id=this.course6id=''
                this.courseid=e;                
                this.getCourse2()
            },
            getCourse2(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        coursewareid:this.courseid,
                        changeid:this.changeid,
                        onlycoursewar:1
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        if(res.data.data==null){
                            this.newcoursewareid=this.course1id
                        }else{
                            this.c2show=true
                            this.course2=res.data.data;
                        } 
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            course2Change(e){
                this.transferdata=[]
                this.course3id=this.course4id=this.course5id=this.course6id='' 
                this.courseid=e;
                this.getCourse3()   
            },
            getCourse3(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        coursewareid:this.courseid,
                        changeid:this.changeid,
                        onlycoursewar:1
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        if(res.data.data==null){
                            this.newcoursewareid=this.course2id
                        }else{
                            this.course3=res.data.data;
                            this.c3show=true
                        } 
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            course3Change(e){
                this.transferdata=[]
                this.course4id=this.course5id=this.course6id=''
                this.courseid=e;
                this.getCourse4()         
            },
            getCourse4(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        coursewareid:this.courseid,
                        changeid:this.changeid,
                        onlycoursewar:1
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        if(res.data.data==null){
                            this.newcoursewareid=this.course3id
                            if(this.SdialogFormVisible==false){
                                this.c3show=false
                            }else{
                                this.c3show=true
                            }
                        }else{
                            this.course4=res.data.data;
                            this.c4show=true
                        } 
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            course4Change(e){
                this.transferdata=[]
                this.course5id=this.course6id=''
                this.courseid=e;
                this.getCourse5()                
            },
            getCourse5(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        coursewareid:this.courseid,
                        changeid:this.changeid,
                        onlycoursewar:1
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        if(res.data.data==null){
                            this.newcoursewareid=this.course4id
                            if(this.SdialogFormVisible==false){
                                this.c4show=false
                            }else{
                                this.c4show=true
                            }
                        }else{
                            this.course5=res.data.data;
                            this.c5show=true
                        } 
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            course5Change(e){
                this.transferdata=[]
                this.course6id=''
                this.courseid=e;
                this.getCourse6()      
            },
            getCourse6(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        coursewareid:this.courseid,
                        changeid:this.changeid,
                        onlycoursewar:1
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        if(res.data.data==null){
                            this.newcoursewareid=this.course5id
                            if(this.SdialogFormVisible==false){
                                this.c5show=false
                            }else{
                                this.c5show=true
                            }
                        }else{
                            this.course6=res.data.data;
                            this.c6show=true
                        } 
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            course6Change(e){
                // console.log(this.course6id)
                this.newcoursewareid=e    
            },
            dialogChange(){
                this.dialogFormVisible2=false
            },
            handleCurrentChange(val) {
                this.loading2=true
                this.cur_page=val;
                this.getTableList();
            },
            clearSearch(){
                this.formInline.agentid='' 
                this.formInline.classid='' 
                this.formInline.teacherid='' 
                this.formInline.start_time='' 
                this.formInline.end_time=''
                this.getTableList();
            },
            // 课程详情
            getCourseInfo(gid){
                this.grouporderid=gid
                this.dialogFormVisible4=true
                this.courseNameTree=[]
                this.$axios({
                    url: base.baseUrl+"/school/course/get-course-info",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        grouporderid:this.grouporderid
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.courseInfo=res.data.data
                        this.starttime=this.transData(this.courseInfo.classSchedule.starttime)
                        this.endtime=this.transData(this.courseInfo.classSchedule.endtime)
                        this.ifcourseInfo=true
                        for(var index in res.data.data._courseNameTree){
                            this.courseNameTree.push(res.data.data._courseNameTree[index])
                        }
                        this.courseNameTree=this.courseNameTree.join("->");
                        
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                })
            },
            transData(time){
                return formatDate(new Date(time * 1000), 'yyyy-MM-dd hh:mm');
            },
            dodown(url){
                window.open(url);
            },
                  
            // 废除
            dataForm(arr){
                var dataArr=[];
                arr.map((item ,index)=>{
                    if(item.sublist.length>0){
                        dataArr.push({
                            label: item.title,
                            value: item.id,
                            children:this.dataForm(item.sublist)
                        })
                    }else{
                         dataArr.push({
                            label: item.title,
                            value: item.id,
                        })
                    }
                });
                return dataArr;
            },
            cascaderChange(value) {
                this.newcoursewareid=value[value.length-1]
                // console.log(value[value.length-1]);
            },
            
            // 改签教材
            changeCourseWare(cid){
                this.changeid=this.form.changeid=cid
                this.dialogFormVisible3=true
                this.c2show=this.c3show=this.c4show=this.c5show=this.c6show=false
                this.course1=[]
                this.course1id=''
                this.getCourseList()
            },
            // 确认改签教材
            setCourseware(){
                this.$axios({
                    url: base.baseUrl+"/school/course/set-course-detail",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        changeid:this.changeid,
                        newcoursewareid:this.newcoursewareid
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.alertTip('改签成功')
                        this.dialogFormVisible3=false
                    }else if(res.data.code==-2){
                        this.$router.push('/login');
                    }
                });
            },
            // 取消课程
            cancelCourse(cid){
                // this.dialogFormVisible1=true
                this.changeid=this.form.changeid=cid
                this.getCancleInfo()
            },
            getCancleInfo(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-charge-info",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        changeid:this.changeid,
                        operatetype:2
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.dialogFormVisible1=true
                        this.cancleInfo=res.data.data; 
                    }else if(res.data.code==-2){
                        this.$router.push('/login');
                    }
                });
            },
            // 确认取消课程
            confirmCancel(){
                this.$axios({
                    url: base.baseUrl+"/school/course/cancel-course",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        changeid:this.changeid
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.alertTip('取消成功')
                        this.dialogFormVisible1=false
                        this.getTableList()
                    }else if(res.data.code==-2){
                        this.$router.push('/login');
                    }
                });
            },
            // 改签课程
            changeCourse(cid,sid){
                this.changeid=this.form.changeid=cid
                this.classid=this.form.classid=sid
                this.dialogFormVisible2=true
                // 清空改签教材数据
                this.c2show=this.c3show=this.c4show=this.c5show=this.c6show=false
                this.course1=[]
                this.course1id=''
                this.getOrderInfo()
                this.getTeacherOpt()
                this.getCourseList()
            },
            getOrderInfo(){
                this.$axios({
                    url: base.baseUrl+"/school/course/get-order-info",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        orderid:this.changeid
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        this.orderInfo=res.data.data;
                        this.form.areaid=res.data.data.areainfo.itemid
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            // 搜索老师列表
            searchTeacher(){
                // for( var index in this.form.timeArr){
                //     this.form.timeArr[index].timeperweek=(this.form.timeArr[index].timeperweek1)+'-'+(this.form.timeArr[index].timeperweek2)
                //     this.form.tpArr.push(this.form.timeArr[index].timeperweek)
                // }
                // for(var i=0;i<this.form.tpArr.length;i++){
                //     if(this.form.tpArr2.indexOf(this.form.tpArr[i])==-1){
                //         this.form.tpArr2.push(this.form.tpArr[i])
                //     }
                // }
                // console.log(this.newcoursewareid)
                this.$axios({
                    url: base.baseUrl+"/school/course/normal-teacher-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        isscatter:1,
                        classid:this.form.classid,
                        areaid:this.form.areaid,
                        classtool:this.form.classtool,
                        gender:this.form.gender,
                        chineselevel:this.form.chineselevel,
                        professional:this.form.professional,
                        startdate:this.form.startdate,
                        enddate:this.form.enddate,
                        changeid:this.changeid,
                        coursewareid:this.newcoursewareid,
                        // classid:262,
                        // areaid:1318,
                        // classtool:788,
                        // gender:0,
                        // chineselevel:761,
                        // professional:451,
                        // startdate:'2018-07-07',
                        // timeperweek:['2-3','1-1','3-12'],
                        // studyplan:[7218,7219,7220,7221,7222,7223],
                        // termlen:3
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    // this.form.tpArr3=this.form.tpArr2    
                    // this.form.tpArr = []
                    // this.form.tpArr2 = []
                    this.form.coursewareid=this.newcoursewareid
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.avaTeacher2=res.data.data.teacherlist
                        if(this.avaTeacher2.length==0){
                            this.alertTip('没有符合条件的老师')
                        }
                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },

            getTeacherOpt(){
                 this.$axios({
                    url: base.baseUrl+"/school/course/get-teacher-opt",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        this.professional=res.data.data.professional;
                        this.area=res.data.data.area;
                        this.chineselevel=res.data.data.chineselevel;
                        this.form.classTool=res.data.data.classtool

                    }else if(res.data.code==-2){
                        this.$router.push('/login')
                    }
                });
            },
            // =======================原页面
            getTableList(){
                this.$axios({
                    url: base.baseUrl+"/school/class-time-table/get-class-schedule",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        teacherid:this.formInline.teacherid,
                        agentid:this.formInline.agentid,
                        classid:this.formInline.classid,
                        start_time:this.formInline.start_time,
                        end_time:this.formInline.end_time,
                        classtype:2,
                        p:this.cur_page,
                        page_size:this.page_size
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==-1){
                        this.alertTip(res.data.msg)
                    }else if(res.data.code==200){
                        this.experienceData=res.data.data.member_list
                        this.loading2=false
                        this.totalCount=Number(res.data.data.pages.total_count);
                    }                    
                });
            },
            getTeacherList(){
                this.$axios({
                    url: base.baseUrl+"/school/teacher/get-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        this.teacherList=res.data.data;
                    }else if(res.data.code==-2){
                        this.$router.push('/login');
                    }
                });
            },
            getSchoolList(){
                this.$axios({
                    url: base.baseUrl+"/school/agent/get-agent-list",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        this.schoolList=res.data.data;
                    }else if(res.data.code==-2){
                        this.$router.push('/login');
                    }  
                });
            },
            getClassList(){
                this.$axios({
                    url: base.baseUrl+"/school/class/get-class-select",
                    method: "POST",
                    header: { 'content-type': 'application/x-www-form-urlencoded' },
                    data:{
                        token:localStorage.token,
                        classtype:2
                    },
                    transformRequest: [function (data) {
                        let ret = ''
                        for (let it in data) {
                            ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
                        }
                        return ret
                    }],
                }).then(res => {
                    if(res.data.code==200){
                        this.classList=res.data.data;
                    }else if(res.data.code==-2){
                        this.$router.push('/login');
                    }
                });
            },
            alertTip(msg){
                this.$alert(msg, '提示', {
                    confirmButtonText: '确定',
                    // callback: action => {
                    //     this.$message({
                    //         type: 'info',
                    //     });
                    // }
                });
            },
            ifShowxianxia(){
                if(localStorage.roleid==10||localStorage.roleid==12||localStorage.roleid==13||localStorage.roleid==14||localStorage.roleid==15){
                    this.xxSelect=true
                }
            }
        },
        created(){
            this.getTeacherList()
            this.getSchoolList()
            this.getClassList()
            this.getTableList()
            this.ifShowxianxia()
        },
        filters:{
            transData(time){
                return formatDate(new Date(time * 1000), 'yyyy-MM-dd hh:mm');
            }
        }
    }
</script>
<style lang="less" scoped>
    .page_block{
        position: absolute;
        margin-top:12px;
        right: 5%;
    }
     .kejianStyle{
        float:left;margin-right:4px;
    }
    @media screen and (max-width:1700px){
        .el-form--inline{
            width: 1400px;
        }  
    }
    @media screen and (max-width:1700px){
        .newWidth{
            width: 180px;
        }
        .search_btn{
            width: 80px!important;
        }  
        .reset_btn{
            width: 100px!important;
        }
    }
     @media screen and (max-width:1440px){
        .newWidth{
            width: 130px;
        }
        .reset_btn{
            width:90px!important;
            padding: 0;
        }
    }
    .experienceTable{
        .experience_inputs{
            height: 60px;
            box-sizing: border-box;
            background: #f5f5f5;
            padding-top: 10px;
            display: flex;
            .creatBtn{
                width: 240px;
                cursor: pointer;
            }
            .operate_inputs{
                // padding: 15px 30px;
                height: 70px;
                box-sizing: border-box;
                button{
                    width: 130px;
                    height: 38px;
                    border-radius: 4px;
                    border: none;
                }
                .search_btn{       
                    background-color: #ff5263;
                }
                .reset_btn{
                    background-color: #808080;
                }
            }
        }
        .searchTeacher{
            text-align: right;
            button{
                width: 200px;
                font-size: 16px;
            }
        }
    }
</style>

